<%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.List,java.util.Iterator, Modelo.Fuente" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%
            response.setHeader("Cache-Control", "max-age=0");
            response.setHeader("Cache-Control", "no-cache");
            response.setHeader("Cache-Control", "no-store");
            response.setHeader("Pragma", "no-cache");
            response.setDateHeader("Expires", -1);
%>
<html>
    <head>
        <%

        %>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Autoevaluacion</title>
        <link href="<%=request.getContextPath()%>/css/style2.css" rel="stylesheet" type="text/css" media="screen" />
        <script type="text/javascript" src="<%=request.getContextPath()%>/jQuery/js/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="<%=request.getContextPath()%>/jQuery/js/jquery-ui-1.7.2.custom.min.js"></script>
        <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/jQuery/bdc-ddmenu-0.3/css/ddmenu.css"/>
        <script type="text/javascript" src="<%=request.getContextPath()%>/jQuery/bdc-ddmenu-0.3/js/jquery.bdc.ddmenu.js"></script>

        <script type="text/javascript">
            $(function(){
                $('#nav > ul').ddMenu({
                    initial: 'BDC DrillDown Menu|Examples',
                    easing: 'easeOutExpo',
                    duration: 1000,
                    rootTitle: 'jQuery'
                });
                $('a[href^=http://]').attr('target', '_blank');

              
                $('#example').ddMenu({ rootTitle: 'Enlaces Institucionales' , easing: 'easeOutBounce' });


            });
        </script>

    </head>

    <body>
        <%
                    HttpSession s = request.getSession();
                    if (s.getAttribute("logged") != null && s.getAttribute("logged").equals(true)) {
                        if (s.getAttribute("tipo").equals("fuente")) {
                            response.sendRedirect(request.getContextPath() + "/fuente/indexFuente.jsp");
                        } else {
                            if (s.getAttribute("tipo").equals("comitePrograma")) {
                                response.sendRedirect(request.getContextPath() + "/comitePrograma/indexComitePrograma.jsp");
                            } else {
                                if (s.getAttribute("tipo").equals("comiteCentral")) {
                                    response.sendRedirect(request.getContextPath() + "/comiteCentral/indexComiteCentral.jsp");
                                }
                            }


                        }
                    }

        %>
        <jsp:include page="componentes/cabecera2.jsp"></jsp:include>

        <div id="page">
            <div id="page-bgtop">
                <div id="content">
                    <div class="post">
                        <div class="entry">
                            <form method="POST" action="checkLogin.jsp">

                                <fieldset>
                                    <legend>Formulario de Acceso</legend>
                                    <dl>
                                        <dt><label for="tipo">Tipo:</label></dt>
                                        <dd>
                                            <%  List lista = new Fuente().getListaFuentes();
                                                        Iterator it = lista.iterator();
                                            %>
                                            <select name="tipo" id="tipo">
                                                <option selected value="op00">Por favor seleccione..</option>
                                                <optgroup label="Fuentes">
                                                    <%
                                                                while (it.hasNext()) {
                                                                    Fuente f = (Fuente) it.next();
                                                    %>
                                                    <option value="op1<%=f.getId()%>"><%=f.getNombre()%></option>
                                                    <%}
                                                    %>
                                                </optgroup>
                                                <optgroup label="Otros">
                                                    <option value="op25">Comite Central</option>
                                                    <option value="op26">Comite Programa</option>
                                                </optgroup>

                                            </select>
                                        </dd>
                                    </dl>
                                    <dl>
                                        <dt><label for="codigo">Codigo:</label></dt>
                                        <dd><input type="text" name="codigo" id="codigo" size="32" maxlength="32" /></dd>
                                    </dl>
                                    <dl>
                                        <dt><label for="clave">Clave:</label></dt>
                                        <dd><input type="password" name="clave" id="clave" size="32" maxlength="128" /></dd>
                                    </dl>
                                </fieldset>
                                <fieldset class="action">
                                    <input type="hidden" name="opt">
                                    <input type="submit" name="ingresar" id="ingresar" value="Ingresar" />
                                </fieldset>
                            </form>
                        </div>
                    </div>
                </div>
                <!-- end #content -->
                <div id="sidebar">
                    <jsp:include page="componentes/menu2.jsp"></jsp:include>
                </div>
                <!-- end #sidebar -->
                <div style="clear: both;">&nbsp;</div>
            </div>

            <jsp:include page="componentes/pie.jsp"></jsp:include>

        </div><!--page-->
    </body>
</html>
